package coherence;

public class CoherenceBuilder {

	CoherenceInputsFromConflict coherenceInputsFromConflict;
	CoherenceInputsFromGlobals coherenceInputsFromGlobals;
	
	public CoherenceInputsFromConflict getCoherenceInputsFromConflict() {
		return coherenceInputsFromConflict;
	}

	public CoherenceInputsFromGlobals getCoherenceInputsFromGlobals() {
		return coherenceInputsFromGlobals;
	}

	public static CoherenceBuilder getCoherenceBuilder(CoherenceInputsFromConflict coherenceInputsFromConflict,
			CoherenceInputsFromGlobals coherenceInputsFromGlobals){
		return new CoherenceBuilder(coherenceInputsFromConflict,
				coherenceInputsFromGlobals);
	}
	
	private CoherenceBuilder(CoherenceInputsFromConflict coherenceInputsFromConflict,
			CoherenceInputsFromGlobals coherenceInputsFromGlobals){
		this.coherenceInputsFromConflict = coherenceInputsFromConflict;
		this.coherenceInputsFromGlobals = coherenceInputsFromGlobals;
		if(!coherenceInputsFromConflict.validate() ||
				!coherenceInputsFromGlobals.validate())
			throw new IllegalArgumentException("incomplete input in constructor");
	}	
	
}
